package zj.it.bhne.gridengineeringsurvey.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;
import android.widget.TextView;

import zj.it.bhne.gridengineeringsurvey.BaseActivity;
import zj.it.bhne.gridengineeringsurvey.R;

public class AddPointsActivity extends BaseActivity implements View.OnClickListener {

    private Double latitude;
    private Double longitude;
    private String name;
    private ImageButton activity_ib_back;
    private TextView activity_tv_title;
    private TextView activity_tv_save;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_add_points);
        initView();
        initData();
    }

    private void initData() {
        Intent intent = getIntent();
        latitude = intent.getDoubleExtra("lat", 0);
        longitude = intent.getDoubleExtra("lon", 0);
        name = intent.getStringExtra("name");
    }

    private void initView() {
        activity_ib_back = findViewById(R.id.activity_ib_back);
        activity_tv_title = findViewById(R.id.activity_tv_title);
        activity_tv_save = findViewById(R.id.activity_tv_save);

        activity_ib_back.setOnClickListener(this);
        activity_tv_title.setText("新增点信息");
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.activity_ib_back:
                finish();
                break;
        }
    }
}
